import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        List<String> list = new ArrayList<>();
        while(in.hasNext()){
            String str = in.next();
            list.add(str);
        }
        for(int i = list.size()-1 ; i >= 0 ; i--){
            if(i == 0){
                System.out.print(list.get(i));
            }else{
                System.out.print(list.get(i)+" ");
            }
        }
    }
}